public class Constants {
    public enum Date {

        DatePattern("yyyy-mm-dd"),
        TimePattern("mm-dd");

        private String pattern;

        Date(String pattern) {
            this.pattern = pattern;
        }
    }

    public static void main(String[] args) {
        String pattern = Date.DatePattern.pattern;
        System.out.println("pattern = " + pattern);
    }
}
